home *** CD-ROM | disk | FTP | other *** search
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ----------------------------------
- unStufit: for the IBM PC
- ----------------------------------
- STUFFIT file unpacker
- ----------------------------------
-
-
-
-
-
-
-
- unStufit is distributed freely and may be copied by anyone for
- any number of machines. The author considers unStufit to be
- "shareware" or "freeware". unStufit is a part of the shareware
- package PC-VCO. If you have subscribed to PC-VCO, unStufit is
- released for your use. If you wish to use unStufit without
- subscription to PC-VCO, please support its development and main-
- tenance with a subscription of 10.00 dollars. The author may be
- reached at:
-
- CABER Software
- R. (Scott) McGinnis
- P.O. Box 3607 Mdse Mart
- Chicago, IL 60654-0607
-
- PLINK id: TARTAN
-
-
-
-
- Version 1.0: 880211
- R.McGinnis; Chicago
-
- unStufit: STUFFIT file extractor
- Version 1.0: 880211
-
-
- Table of Contents
- -----------------
-
-
-
- I. Introduction ................................................. page 1
-
- II. Running the program .......................................... page 3
-
- III. unStufit Command Summary ...................................... page 4
-
- IV. unStufit Switches ............................................. page 5
-
- V. VCOLIB usage .................................................. page 6
-
- VI. Batch extraction .............................................. page 7
-
- VII. Program Requirements .......................................... page 7
-
- VIII. Program and Author Information ............................... page 8
-
-
-
-
- Appendices
- ----------
-
-
- A. MacBinary Header .............................................. page 9
-
- B. STUFFIT File structure ........................................ page 10
-
- C. STUFFIT Archive Header ........................................ page 11
-
- D. STUFFIT Subfile Header ........................................ page 12
-
- E. unStufit Error messages ....................................... page 13
-
-
-
-
- unStufit: STUFFIT file extractor Page 1
- Version 1.0: 880211
-
-
- I. Introduction
-
-
- unStufit for the IBM PC is a utility that extracts files packed
- together on a MacIntosh computer with the STUFFIT utility. STUFFIT
- on the MacIntosh will pack multiple files together (optionally
- compressing and encoding them) into one file. unStufit on the IBM
- PC allows the extraction of individual files from the STUFFIT
- envelope. Many files maintained as '.SIT' (the usual STUFFIT
- extension) on Mac BBS's, Clubs, and SIG's are now accessible to
- users of the IBM PC.
-
-
- STUFFIT was developed and has been extended by Raymond Lau. STUFFIT
- (through version 1.20) stored files together, with non-compression
- and 3 optional types of data compression. STUFFIT is available as
- shareware.
-
-
- unStufit is compatible with STUFFIT. unStufit was developed to
- support the shareware package PC-VCO for the IBM PC. Face files
- created on MacIntosh computers are frequently packed together on the
- various boards: PLINK, CIS, Delphi, and GEnie. Now packed face
- files are available to PC-VCO users. A packed file may be
- downloaded to an IBM PC and unStufit used to extract individual face
- files.
-
-
-
- unStufit may be copied freely and distributed to anyone for any
- number of machines. The author considers this to be "shareware" or
- "freeware" unStufit is a part of the shareware package PC-VCO. If
- you have sub- scribed to PC-VCO, unStufit is released for your use.
- If you wish to use unStufit without subscription to PC-VCO, a
- contribution is asked. unStufit (and PC-VCO/unStufit) will be
- extended and enhanced if response warrants.
-
-
- unStufit: STUFFIT file extractor Page 2
- Version 1.0: 880211
-
-
- I. Introduction (continued)
-
-
- What is PC-VCO, by-the-way?
-
- PC-VCO is a communications program for the IBM PC with two sides.
- On the one hand, it provides standard comm program functions: a
- dialing directory, macros, disc logging, XMODEM and ASCII file
- transfer, and so on. However, used with network conferencing
- services such as People/Link's PARTY, CompuServe's CB and Delphi's
- conference area, PC-VCO provides a way to 'see' and 'hear' people
- talking.
-
-
- The idea for PC-VCO was derived from the VCO system, and its
- predecessor VMCO, developed for the MacIntosh computer. The VCO
- programs (PC and MacIntosh) allow you to see the people you
- communicate with on-line, using the graphic capabilities of the
- personal computer and to hear conversation with speech synthesis.
-
-
-
- VCO was originally developed by Harry Chesley. It was followed by
- VMCO (which is CIS specific), written by Bob Perez independant to
- the development of VCO. The current (MacIntosh) version of VCO is
- almost an exact duplicate of Harry Chesley's original - the original
- source code was converted by Mike Cohen and made to accept multiple
- service formats. [Note: Mike Cohen's VCO uses VMCO formated files.
- Harry Chesley's VCO files differ. VCOLIB can accomodate either.
- PC-VCO in VCO mode can talk to either, according to your choice.]
-
-
- The MacIntosh VCO allows the user to see the people talking on-line
- through graphic Icons. The Icons are provided to the VCO program as
- 'Resource files' and are built using a 'Resource Editor'. Each VCO
- user must have a resource file for every potential other speaker.
- Charlie Brown and Snoopy Icons are used if no 'Faces' are available.
- A range of expressions, from 'normal' to bored to surprised make VCO
- conferences lively. Each participant controls the expression
- displayed to all other participants.
-
-
- On most large systems, the face files for 20 or more people have
- been packed (and compressed) together with the shareware product
- STUFFIT. The files will be found in the library areas with the
- extension of '.SIT'. And thus unStufit for the IBM PC !
-
-
- unStufit: STUFFIT file extractor Page 3
- Version 1.0: 880211
-
-
- II. Running the program
-
-
- unStufit is invoked at the DOS prompt with the command:
-
- ------------------------------------------------------
- "d>" unStufit <option>
-
- Where "d>" is the DOS prompt, and
-
- <option> is: (<switch> or <cmd> <SIT-File> (<parm> (,<parm> ...)))
-
- where <switch> is one of the following: /+, /-, /B, /D, /R
- <parm> is a subfile name,
- <SIT-file> is the STUFFIT file name to be used,
- and <cmd> is one of the following: E,X,L,V
-
- Note: Specifying no commands at all will provide an abbreviated
- HELP display summarizing available commands.
- ------------------------------------------------------
-
- unStufit commands and switches are summarized on the next pages.
-
-
- unStufit: STUFFIT file extractor Page 4
- Version 1.0: 880211
-
-
- III. unStufit Command Summary.
-
-
- Command Parameter Description
- --------- --------- --------------------------------------------------
- (E)xtract subfile Extract the specified subfile. Subfile names are
- name listed with the 'L' or 'V' commands. Subfile names
- are up to 63 bytes in length, and may not contain
- a comma or a semi-colon. Case is not significant.
-
- (X)tract subfile Extract the specified subfile. This is simply a
- name synonym for the 'E' command discussed above for
- those of us who spell phonetically.
-
- (L)ist List the subfiles of the specified SIT file. If
- a parameter is given it will be ignored. The
- list command gives the following information:
-
- Subfile name (1-63 characters in length)
- File Type (4 characters)
- File creator (4 characters)
- Compression. Compression types are:
-
- 0 - non-compression
- 1 - repeat character compression (RLE)
- 2 - dynamic Lempel-Ziv,Weiss compression
- 3 - Huffman compression
-
-
- (V)erbose List the subfiles of the specified SIT file. If a
- parameter is given it will be ignored. The verbose
- list gives the information above and the following:
-
- Data Fork size: Byte count in the
- subfile's Data fork.
- Resource Fork size: Byte count in the subfile's
- Resource fork.
- Creation date: Date the file was created.
- Modification date: Date the file was last
- modified.
-
- unStufit: STUFFIT file extractor Page 5
- Version 1.0: 880211
-
-
- IV. unStufit Switches.
-
-
- unStufit uses switches to control its output format. In order to
- explain these switches, some preliminaries are required. Bear
- with me, please, if you already understand the following points:
-
- . Files uploaded by a MacIntosh and downloaded by an IBM PC will have
- a header called 'MacBinary'. The MacBinary header gives specifics
- about the file's name, type/creator, etc. The SIT file used by
- unStufit must have a MacBinary header, with a type of "SIT!" and a
- creator of "SIT!". VCOLIB (the face file librarian for PC-VCO)
- expects face files offered it for ingestion to have a MacBinary
- header.
-
- . MacIntosh files are implemented as 'forks'... each file has a
- 'Data' and a 'Resource' fork. The Data fork is what we who use
- IBM PC's understand to be a file - it is object code, data, a data
- base, what-have-you. The Resource fork contains O/S information
- such as the ICON to be displayed to represent the file. Again
- using VCOLIB as an example: VCOLIB uses only the resource fork of
- a face file.
-
- And I don't know why the whole construction isn't referred to as
- a fork, and the elements 'tines'.
-
-
- With this understood, unStufit offers the following switches (which
- must be entered prior to the command(s) effected):
-
- Switch Description
- ------- ------------------------------------------------------------
- /+ Default condition. A MacBinary header is created for each
- file extracted (with the appropriate name, type and creator).
-
- /- No MacBinary header will be output with extracted files. This
- would be appropriate if, for example, an encrypted file were
- being uncompressed and encryption performed separately.
-
- /B Default condition. Both the Data and Resource forks are to be
- extracted (if present). Each will be output as a separate file
- on the IBM PC (the name for each file will be queried).
-
- /D Only the Data fork is to be extracted. The Resource fork will
- be skipped if present.
-
- /R Only the Resource fork is to be extracted. The Data fork will
- be skipped if present.
-
-
- unStufit: STUFFIT file extractor Page 6
- Version 1.0: 880211
-
-
- V. VCOLIB usage.
-
-
- Face files packed together into one SIT file will have certain
- characteristics. First of all, the Data fork for each subfile will
- be empty (size is 0 bytes). Only the Resource fork is used. VCOLIB
- will only accept resource files with one of the following
- type/creator values:
-
- Type Creator Usage
- ---- ------- --------------------------------------------
- FACE VCO! File created for use with Mike Cohen's VCO
- (this version is mostly used on PLINK)
- FACE VMCO File created for use with Bob Perez's VMCO
- (this version is mostly used on CIS)
- HRC1 HRC1 File created for use with Harry Chesley's VCO
- (this version is mostly used on GEnie and Delphi)
-
-
- For example: you might find a face-file Stuffit archive in the CIS
- MacIntosh Users Group (MAUG) library (DL) named FACES1.SIT. Down-
- load the file using an error free binary protocol. It will be seen
- to conform to the above description (0 size data forks, and
- type/creator of "FACEVMCO".
-
-
- List the file's contents with the command:
-
- "d>" unStufit L FACES1.SIT (assuming that is the name you gave it)
-
-
- Extract an individual face with the command:
-
- "d>" unStufit X FACES1.SIT <somebody's name from the listing>
-
- You will be queried for the file name for the extracted subfile.
- Choose any name (the face file itself contains the original name,
- so the name you use for the file is relatively unimportant) that
- does not conflict with a file already on your diskette/subdirectory.
-
-
- Add the extracted file to PC-VCO's face library with the command:
-
- "d>" VCOLIB A <your library file> <the extracted file's name>
-
- Normally, the library file would be PC-VCO.FLB. You may view the
- entry with the command:
-
- "d>" VCOLIB V <your library file> <the name as it was originally>
-
-
-
- unStufit: STUFFIT file extractor Page 7
- Version 1.0: 880211
-
-
- VI. Batch Extraction
-
-
- Version 1.0 of unStufit allows redirection of the output (e.g. of
- the 'L' command to the printer. However, redirection of input is
- not supported. Although it may appear obvious to build a contents
- list of a SIT file with the command:
-
- d> unStufit >TEMP.TXT L JAPANART.SIT ; This works just nicely
-
- and then edit the result - providing blank (empty) lines for files
- to be skipped - it won't work. When the edited file is presented to
- be processed, e.g. with the command:
-
- d> unStufit <TEMP.TXT X JAPANART.SIT ; It doesn't work!
-
- the program terminates abnormally. If this program is extended,
- this feature will be one of the first addressed.
-
-
- unStufit will accept the 'X' command with no operand and unpack the
- entire contents of the SIT file. The command above (without the
- redirection of input, of course) is an example. Simply enter:
-
- d> unStufit X <SIT file name>
-
- and every file within the SIT file will be unpacked. You can skip a
- subfile with a null entry - a carriage return) at the file name
- prompt. And its faster than a selective extraction. Another matter
- to be addressed if response warrants.
-
-
- VII. Program Requirements
-
-
- This program can only function on an IBM PC or DOS compatible
- machine. It uses 'Handle' oriented I/O routines added with DOS 2.0.
- Therefore DOS 2.0 is also a requirement.
-
-
- The current version's memory requirements are modest. unStufit
- requires 96K - you'll need at least 128K.
-
-
- unStufit: STUFFIT file extractor Page 8
- Version 1.0: 880211
-
-
- VIII. Program and Author Information
-
-
- This program was written using Microsoft Macro-Assembler, version
- 5.0. The author likes assembler. Assembly language is an entirely
- appropriate vehicle for the program.
-
-
- unStufit, VCOLIB and PC-VCO were written by R. Scott McGinnis of
- Chicago Illinois. [GEnie and PLINK IDs: TARTAN]. Comment and
- suggestions are welcomed. You may also write:
-
-
- CABER Software
- R. (Scott) McGinnis
- P.O. Box 3607 Mdse Mart
- Chicago, IL 60654-0607
-
-
- Credit for information on the MacIntosh must be given to Kelly Major.
- Experience with PACKIT files contributed directly to this code, as
- did the public domain source for ARC. I also thank Elizabeth, for
- putting up with the repeated jaw-breaker: "Lempel-Ziv this and Lempel-
- Ziv that...".
-
-
- unStufit (Version 1.0) may be distributed freely, with the caveat
- that the Author information displayed at program termination is not
- removed. The author considers this to be "shareware" or "freeware".
- unStufit is a part of the shareware package PC-VCO. If you have
- subscribed to PC-VCO, unStufit is released for your use. If you
- wish to use unStufit without subscription to PC-VCO, a contribution
- of $10.00 is requested. unStufit (and PC-VCO/unStufit) will be
- extended and enhanced if response (measured by contribution)
- warrants.
-
-
- Most of the hardware names and software names (and products not
- hardware or software) mentioned in this document are trademarks or
- trade names of specific manufacturers.
-
-
- unStufit: STUFFIT file extractor Page 9
- Version 1.0: 880211 Appendices
-
-
- A. MacBinary header.
-
- The MacBinary header is 128 bytes in length, and structured:
-
-
- 0 1 2 3 4 5 6 7 65
- +------+------+------+------+------+------+------+-----/ /-----+->
- ! Ver ! FLN ! File Name ... !
- +------+------+------+------+------+------+------+-----/ /-----+->
-
- 65 66 67 68 69 70 71 72 73
- >--+------+------+------+------+------+------+------+------+->
- ! Type ! Creator !
- >--+------+------+------+------+------+------+------+------+->
-
- 73 74 ... 126 127
- >--+------+-----/ /-----+------+
- ! Unused by us !
- >--+------+-----/ /-----+------+
-
- Where: Ver -------> MacBinary Version Number
- FLN -------> Len of following File name (value 0-63)
- File Name -> File Name; Used here as Creator ID.
- Type ------> Type of file field. We expect "SIT!".
- Creator ---> Creator of file field. We expect "SIT!".
-
-
-
- unStufit: STUFFIT file extractor Page 10
- Version 1.0: 880211 Appendices
-
-
- B. STUFFIT file structure.
-
-
- The stuffit file is a concatenated series of subfiles, with
- a MacBinary Header. After the MacBinary header, a stuffit
- file looks like:
-
- sitArchiveHdr
- file1Hdr (uncompressed)
- file1RsrcFork (possibly compressed)
- file1DataFork (possibly compressed)
- file2Hdr ...
- file2RsrcFork ...
- file2DataFork ...
- .
- .
- .
- fileNHdr
- fileNRsrcFork
- fileNDataFork
-
-
-
- unStufit: STUFFIT file extractor Page 11
- Version 1.0: 880211 Appendices
-
-
- C. STUFFIT Archive Header
-
-
- OSType signature; /* = 'SIT!' -- for verification */
- unsigned int numFiles; /* number of files in archive */
- unsigned long arcLength; /* length of entire archive incl.
- hdr. -- for verification */
- OSType signature2; /* = 'rLau' -- for verification */
- unsigned char version; /* version number */
- char reserved[7];
-
-
- -----------------------------------------------------------
- The header has the following structure:
-
- Field Length Contents
- ------- ------- --------------------------------------------
- Sig1 4 Type field for verification (SIT!)
- NumF 2 COunt of files in archive
- Len 4 Archive length (in bytes)
- Sig2 4 Type field for verification (rlau)
- Version 1 Version number
- Fill 7 reserved for future
-
-
- unStufit: STUFFIT file extractor Page 12
- Version 1.0: 880211 Appendices
-
-
- D. Stuffit Subfile Header
-
-
- unsigned char compRMethod; /* rsrc fork compression method */
- unsigned char compDMethod; /* data fork compression method */
- unsigned char fName[64]; /* a STR63 */
- OSType fType; /* file type */
- OSType fCreator; /* erI */
- int FndrFlags; /* copy of Finder flags.
- unsigned long creationDate;
- unsigned long modDate; /* !restoredPcompat w/backup prgms */
- unsigned long rsrcLength; /* decompressed lengths */
- unsigned long dataLength;
- unsigned long compRLength; /* compressed lengths */
- unsigned long compDLength;
- int rsrcCRC; /* crc of rsrc fork */
- int dataCRC; /* crc of data fork */
- char reserved[6];
- int hdrCRC; /* crc of file header */
-
- ------------------------------------------------------------
- The header has the following structure:
-
- Field Length Contents
- ------- ------- --------------------------------------------
- RMethod 1 Resource fork compression method
- DMethod 1 Data fork compression method
- NameLen 1 Length of NAME field in bytes (1-63)
- Name 63 Name of subfile
- Type 4 File type (as above)
- Creator 4 File creator (as creator above)
- Flags 1 Finder flags
- 1 one byte of filler to preserve word alignment
- CrDate 4 file creation date ! Count in seconds since
- ModDate 4 file last modified ! Jan 1, 1904
- RSize 4 32 bit count of bytes in resource fork
- DSize 4 32 bit count of bytes in data fork
- CDSize 4 32 bit count of compressed bytes in data fork
- RSize 4 32 bit count of compressed bytes in resource fork
- Fill 6 reserved for future
- CRC 2 CRC for above header
-
- ------------------------------------------------------------
- Note: the CRC's used in Stuffit are computed as ARC computes
- CRC's - not CCITT CRC-16 at all!.
- ------------------------------------------------------------
-
-
- unStufit: STUFFIT file extractor Page 13
- Version 1.0: 880211 Appendices
-
-
- E. unStufit Error messages.
-
-
- ------------------------------------------------------------
- ... Parameter error
-
- The command line, as entered after the invocation of unStufit could
- not be interpreted. Re-type the command line.
- ------------------------------------------------------------
- ... File name syntax error
-
- unStufit follows the SEA/ARC convention of placing the file name of
- the file to be manipulated after the first command and before the
- parameters of that first command. unStufit could not interpret the
- expected name.
- ------------------------------------------------------------
- ... File is not STUFFIT format
-
- The file specified is not identified as a STUFFIT file in its
- MacBinary header (the first 128 bytes). Type must be "SIT!" and
- creator "SIT!".
- ------------------------------------------------------------
- Short read reading subfile header
-
- The STUFFIT file has been truncated - only part of its contents are
- available for extraction.
- ------------------------------------------------------------
- Warning: Subfile header CRC does not match computed CRC.
-
- The STUFFIT file has been corrupted. Or the author has a bug. If
- the file is downloaded a second time, and the error persists, its
- probably a bug. Please contact the author.
- ------------------------------------------------------------
- Subfile type unrecognized.
-
- The STUFFIT file uses a compression method other than those above.
- ------------------------------------------------------------
- Position past EOF requested.
-
- The STUFFIT file has been truncated - only part of its contents are
- available for extraction.
- ------------------------------------------------------------
- Huffman tree is corrupt. I can not use it.
-
- Decoding information could not be loaded from a compressed file.
- The file could be corrupt, or the author (me, again) may have a bug.
- ------------------------------------------------------------
- Warning: Subfile contentual CRC does not match computed CRC.
-
- The STUFFIT file has been corrupted. Or the author has a bug. If
- the file is downloaded a second time, and the error persists, its
- probably a bug. Please contact the author.